const db = require("../db/db");

const add = async (sql, fields) => {
    return  (await db.insert(sql, fields))[0]
}
const selectmore = async (sql) => {
    // let sql = `commoditycategory`;
    return (await db.selectmoretab(sql))[0];
    // console.log(routs);
    // res.send(routs);
}
const select1 = async (sql) => {
    // let sql = `commoditycategory`;
    return await db.select(sql);
    // console.log(routs);
    // res.send(routs);
}
module.exports = {
    add,
    select1,
    selectmore
}